Circuit device, electronic apparatus, and error detection method using at least an index indicating similarity between foreground image and reference image

ABSTRACT

Provided is a circuit device for detecting error on a display image obtained by image processing. The circuit device includes an image acquisition circuit configured to acquire image data, an image processing circuit configured to perform image processing on the image data to obtain a display image, and an index acquisition circuit configured to obtain an index for performing error detection on the display image. The index represents a degree of matching between a foreground image, which is an image of a given region of the display image, and a reference image, which is a reference with respect to the foreground image. The index is obtained based on pixel values of the display image and pixel values of the reference image or based on pixel values of an edge image of the display image and pixel values of an edge image of the reference image.

This is a divisional application of U.S. patent application Ser. No.16/129,151, filed Sep. 12, 2018, which claims the benefit of priorityfrom Japanese Patent Application No. 2018-023787, filed Feb. 14, 2018.The prior applications are hereby incorporated by reference in entirety.

BACKGROUND 1. Technical Field

The present disclosure relates to a circuit device, an electronicapparatus, an error detection method, and the like.

2. Related Art

In display control in a display device (liquid-crystal display device,for example), a processing device such as a CPU transmits image data anda control signal to a display controller, the display controllerperforms image processing and generates a timing signal, and a displaydriver drives a display panel using the image data subjected to theimage processing and the timing signal. An LVDS (Low VoltageDifferential Signal) method, an RGB serial method, or the like is usedwhen image data is transmitted from the processing device to the displaycontroller. There are cases where a data error due to a communicationerror or the like occurs in image data that the display controller hasreceived. For example, a technique in which a display controller detectsan error in image data received from a processing device using CRC(Cyclic Redundancy Check) is disclosed in JP-A-2012-35677,JP-A-2007-101691, and JP-A-2007-72394.

In error detection using CRC, a processing device obtains a CRC valuefrom image data, transmits the image data and the CRC value to a displaycontroller, and the display controller obtains a CRC value from thereceived image data, and compares the obtained CRC value with the CRCvalue received from the processing device. In this method, whether ornot the received image data matches the image data that the processingdevice has transmitted is verified. Therefore, when image processing isperformed on the received image data, error detection using the receivedCRC value cannot be performed. Specifically, when an image subjected tothe image processing is to be displayed, an error in a display imagecannot be properly detected in error detection using the known CRC.

Also, when bit-wise error detection such as CRC is used, a one-bit errorincluded in image data can be detected, for example. However, even if aminute error such as a one-bit error is included in image data, theimage that is actually displayed does not substantially differ from theoriginal image, and the likelihood that a user will erroneouslyrecognize the image (erroneously recognizes the displayed image as animage different from the original image) is considered to be low. Inbit-wise error detection such as CRC, such a minute error is detected aswell, therefore the bit-wise error detection is not appropriate to beused for the purpose of properly detecting an error that will cause auser to erroneously recognize the image. For example, bit-wise errordetection is not appropriate for determining whether or not, in the casewhere an icon or the like is displayed in a display image, a user cancorrectly recognize an icon or the like.

SUMMARY

According to some aspects of the present disclosure, a circuit devicethat can appropriately detect an error in a display image obtained byperforming image processing, an electronic apparatus, an error detectionmethod, and the like can be provided.

One aspect of the present disclosure relates to a circuit deviceincluding: an image acquisition circuit configured to acquire imagedata; and an index acquisition circuit configured to obtain an index forperforming error detection on a display image based on the image data.The index acquisition circuit is configured to obtain the indexrepresenting a degree of dissimilarity between a foreground image, whichis an image of a given region of the display image, and a backgroundimage, of the display image, corresponding to a background of theforeground image, based on pixel values of the display image.

Also, in one aspect, the circuit device may further include an imageprocessing circuit configured to perform image processing on the imagedata so as to generate the display image. The index acquisition circuitmay obtain the index based on pixel values of the display imagegenerated by the image processing circuit.

Also, in one aspect, the index acquisition circuit may statisticallyobtain the index based on pixel values of the display image.

Also, another aspect of the present disclosure relates to a circuitdevice including: an image acquisition circuit configured to acquireimage data; an image processing circuit configured to perform imageprocessing on the image data so as to obtain a display image; and anindex acquisition circuit configured to obtain an index for performingerror detection on the display image. The index acquisition circuit isconfigured to obtain an index representing a degree of matching betweena foreground image, which is an image of a given region of the displayimage, and a reference image, which is a reference with respect to theforeground image, based on pixel values of the display image and pixelvalues of the reference image or based on pixel values of an edge imageof the display image and pixel values of an edge image of the referenceimage.

Also, in another aspect, the circuit device may further include an indexregister for storing the index.

Also, in another aspect, the circuit device may further include an errordetection circuit configured to perform the error detection on thedisplay image based on the index.

Also, in another aspect, the error detection circuit may perform theerror detection by comparing a threshold value for determining an errorin the display image and the index.

Also, in another aspect, the circuit device may further include athreshold value register in which the threshold value is set.

Also, in another aspect, the circuit device may further include a memoryinto which first to n^(th) images are stored as the foreground images.First to n^(th) threshold values corresponding to the first to n^(th)images are set in the threshold value register as the threshold values,and the error detection circuit may, when the error detection isperformed on the display image that includes an i^(th) image of thefirst to n^(th) images as the foreground image, perform the errordetection using an i^(th) threshold value of the first to n^(th)threshold values.

Also, in another aspect, the circuit device may further include anoperation mode setting register in which an operation mode of thecircuit device when an error is determined in the display image by theerror detection circuit is set.

Also, in another aspect, in the operation mode setting register, a modeof reporting a result of the error detection to a device external to thecircuit device, a mode of not displaying the display image, and a modeof displaying a specific image as the display image, may be set as theoperation modes.

Also, in another aspect, the circuit device may further include a memoryfor storing first to n^(th) images as the foreground images; and anoperation mode setting register in which first to n^(th) operation modescorresponding to the first to n^(th) images are set. An i^(th) operationmode of the first to n^(th) operation modes may be the operation mode ofthe circuit device when an error is determined in the display image bythe error detection circuit, when the error detection circuit hasperformed the error detection on the display image including an i^(th)image of the first to n^(th) images as the foreground image.

Also, yet another aspect of the present disclosure relates to anelectronic apparatus including the circuit device according to any ofthe above descriptions.

Also, yet another aspect of the present disclosure relates to an errordetection method including: acquiring image data; and obtaining an indexthat represents a degree of dissimilarity between a foreground image,which is an image of a given region of a display image based on theimage data, and a background image, of the display image, correspondingto a background of the foreground image, as the index for performingerror detection on the display image, based on pixel values of thedisplay image.

Also, yet another aspect of the present disclosure relates to an errordetection method including: acquiring image data; generating a displayimage by performing image processing on the image data; and obtaining anindex that represents a degree of matching between a foreground image,which is an image of a given region of the display image, and areference image, which is a reference with respect to the foregroundimage, based on pixel values of the display image and pixel values ofthe reference image, or based on pixel values of an edge image of thedisplay image and pixel values of an edge image of the reference image,as the index for performing error detection on the display image.

BRIEF DESCRIPTION OF THE DRAWINGS

The embodiments will be described with reference to the accompanyingdrawings, wherein like numbers reference like elements.

FIG. 1 shows a first exemplary configuration of a circuit device of apresent embodiment.

FIG. 2 shows a second exemplary configuration of the circuit device ofthe present embodiment.

FIG. 3 shows an exemplary configuration of a register circuit when aplurality of foreground images are used.

FIG. 4 is a flowchart illustrating a processing flow of error detectionprocessing.

FIG. 5 shows a histogram of YCbCr channels in a region of interest.

FIG. 6 shows self-correlation values obtained by performing aself-correlation operation on the histogram.

FIG. 7 shows a first example of a display image.

FIG. 8 shows an example of a histogram when the foreground is inmulti-tone.

FIG. 9 shows an example of cross-correlation values of a histogram whenthe foreground is in multi-tone.

FIG. 10 shows an example of a reference image.

FIG. 11 shows an averaged image of the reference image.

FIG. 12 shows a second example of the display image.

FIG. 13 shows a third example of the display image.

FIG. 14 shows a fourth example of the display image.

FIG. 15 shows a first example of a reference image, a display image(region of interest), and a mask image.

FIG. 16 shows an example of edge values calculated from the referenceimage and display image of the first example.

FIG. 17 shows a second example of the reference image, the display image(region of interest), and the mask image.

FIG. 18 shows an example of edge values calculated from the referenceimage and display image of the second example.

FIG. 19 shows an exemplary configuration of an electronic apparatus.

DESCRIPTION OF EXEMPLARY EMBODIMENTS

The following is a detailed description of exemplary embodiments of theinvention. Note that the embodiments described below are not intended tounduly limit the content of the invention recited in the claims, and allof the configurations described in the embodiments are not necessarilyessential as solutions provided by the invention.

1. Circuit Device

FIG. 1 shows a first exemplary configuration of a circuit device of apresent embodiment. A circuit device 100 includes an interface 110(first interface), a pre-processing circuit 125, an image processingcircuit 135, an interface 140 (second interface), an index acquisitioncircuit 155, a CRC circuit 160, a register circuit 170, an iconprocessing circuit 180, an interface 190 (third interface), and a memory195. The circuit device 100 is an integrated circuit device (IC), forexample.

The interface 110 receives image data that is transmitted from aprocessing device 200 or the like to the circuit device 100, andconverts the received image data to a format that is used inside thecircuit device 100, for example. The interface 110 is also referred toas an image acquisition circuit. For example, the interface 110 is anOpenLDI (Open LVDS Display Interface), and converts a serial signalreceived using LVDS (Low Voltage Differential Signaling) to an RGBparallel signal. The processing device 200 is an SoC (System on a Chip),an MCU (Micro Control Unit), a CPU (Central Processing Unit), and thelike.

The pre-processing circuit 125 performs various types of imageprocessing on image data that is input from the interface 110. Forexample, the pre-processing circuit 125 performs gamma correction, FRC(Frame Rate Control), white balance processing, and the like. Forexample, a one-dimensional lookup table for each of an R channel, a Gchannel, and a B channel is stored in the memory 195, the registercircuit 170, or an unshown nonvolatile memory, and gamma correction isperformed on the channels using the respective lookup tables. In theFRC, processing to express an intermediate tone in a pseudo manner isperformed by switching tones between frames. In the white balanceprocessing, a one-dimensional lookup table for adjusting the whitebalance is stored in the memory 195, the register circuit 170, or anunshown nonvolatile memory, and the RGB channels are adjusted using thelookup table, for example.

The icon processing circuit 180 generates or acquires an icon image. Forexample, the icon processing circuit 180 is an icon color extensioncircuit. A mask image for the icon is stored in the memory 195, and theicon processing circuit 180 converts the mask image into a RGB image soas to generate the icon image. The mask image is a k-bit image whosepixels each have k bits of data. k is an integer of one or more. Anindex color table including 2 to the power k pieces of data is stored inthe memory 195, the register circuit 170, or an unshown nonvolatilememory, and the icon processing circuit 180 converts k-bit data to RGBdata according to the color table. For example, when k=2, the colortable is a lookup table in which 2-bit indices are respectivelyassociated with four colors. Alternatively, when k=1, the color table isa lookup table in which 1-bit indices are respectively associated withtwo colors, “0” indicating a background pixel is associated with aspecific color, and “1” indicating a foreground pixel is associated withanother color. Another color is a specific color that is different fromthat of the background. The memory 195 is a RAM such as an SRAM.

The image processing circuit 135 overlays an icon image on an image(hereinafter, referred to as an input image) input from thepre-processing circuit 125 so as to make composite the icon image withthe input image, and outputs the composite image to the interface 140 asa display image. The display image in this case is a rendered image. Forexample, the image processing circuit 135 overlays an icon image on aninput image such that the icon image completely hides the background.The background, here, is the input image. Alternatively, an icon imageand a background may be blended at a given blending ratio. The positionat which the icon image is overlaid on the input image is set in thememory 195, the register circuit 170, or an unshown nonvolatile memory.Also, the image processing circuit 135 performs various types of imageprocessing on an input image or a composite image in which an icon imageis composited to the input image, and outputs the resultant image afterthe image processing as the display image. The image processing is toneconversion processing, coordinate conversion processing, colorconversion processing, interpolation processing, and the like.

The interface 140 outputs the display image to a device external to thecircuit device 100. The device external to the circuit device 100 is adisplay driver that drives a display panel, for example. For example,the interface 140 is an LVDS interface, and converts an RGB parallelsignal from the image processing circuit 135 to an LVDS serial signal.The interface 140 outputs the display image along with an index, and thedisplay driver that has received the index may perform an operationbased on the index. The operation based on the index is to stop display,for example.

The interface 190 mediates communication between the circuit device 100and processing device 200 with respect to setting information, controlinformation, and the like. For example, the interface 190 is a serialcommunication interface conforming to the SPI (Serial PeripheralInterface) method, the I2C method, or the like. The setting informationand control information from the processing device 200 is written intothe register circuit 170, for example, and the circuit device 100performs an operation according to the setting information and controlinformation.

The CRC circuit 160 performs error detection on the image data that theinterface 110 has received using CRC. That is, the CRC circuit 160compares a reference CRC value that was input from the processing device200 via the interface 190 with the CRC value calculated from the imagedata that the interface 110 has received, and detects whether or notthese values match.

The index acquisition circuit 155 obtains, from a region of interest(ROI) of the display image, an index that indicates whether the image ofthe region of interest is appropriately displayed. The region ofinterest is a region including the icon in the display image.Specifically, the index acquisition circuit 155 obtains an index thatrepresents a degree of dissimilarity between a foreground imagecorresponding to the icon image of the display image and a backgroundimage corresponding to the background, of the display image, of theforeground image, based on the pixel values of the display image. Thisindex is a visibility index for evaluating visibility of the icon, andthe details thereof will be described later. The background image is theinput image or an image obtained by performing image processing on theinput image, and the image of a portion of the display image excludingthe foreground image. Alternatively, the index acquisition circuit 155obtains, based on the pixel values of the display image and the pixelvalues of the reference image, which is a reference with respect to theforeground image, or based on the pixel values of an edge image of thedisplay image and the pixel values of an edge image of the referenceimage, an index that represents the degree of matching between theforeground image corresponding to the icon image of the display imageand the reference image. This index is a shape index that evaluates thesimilarity between the shape of the icon and a reference, and thedetails thereof will be described later. The reference is a mask image,for example.

The register circuit 170 is configured to be accessible from theprocessing device 200 via the interface 190. The register circuit 170includes an index register 171 that stores an index obtained by theindex acquisition circuit 155, and the processing circuit 200 reads outan index from the index register 171 via the interface 190. Theprocessing circuit 200 includes an error detection circuit that performserror detection based on the index. The error detection performed on thedisplay image through image analysis is realized by acquiring the indexand performing the error detection described above. That is, whether ornot an icon image is properly composited to an input image is checkedthrough image analysis.

The image data subjected to image processing by the image processingcircuit 135 is different from the image data received by the interface110, and therefore error detection using a CRC value input from theprocessing device 200 cannot be performed. In the present embodiment,the visibility index and the shape index are obtained from an imagesubjected to image processing, the visibility of an icon and thesimilarity between the icon shape and a reference are evaluated, andtherefore error detection can be performed based on the evaluationresults. That is, an error can be determined if the visibility of theicon or the similarity between the icon shape and the reference is low.

Note that, logic circuits included in the circuit device 100 may beconfigured as separate circuits, or may be configured as an integratedcircuit using automatic placement and routing or the like, for example.The logic circuits are the pre-processing circuit 125, the imageprocessing circuit 135, an error detection circuit 150, the CRC circuit160, the icon processing circuit 180, and the like, for example. Also, aportion or all of the logic circuits may be realized by a processor suchas a DSP (Digital Signal Processor). In this case, programs orinstruction sets in which functions of the circuits are described arestored in a memory, and the functions of the circuits are realized bythe processor executing the programs or the instruction sets.

FIG. 2 shows a second exemplary configuration of the circuit device ofthe present embodiment. In FIG. 2, the circuit device 100 includes theerror detection circuit 150. Also, the register circuit 170 includes anerror detection result register 174. Note that the constituent elementsthat are the same as the constituent elements that have been describedin FIG. 1 will be denoted by the same reference signs, and thedescriptions thereof will be omitted, as appropriate.

The index acquisition circuit 155 outputs an obtained index to the errordetection circuit 150. The error detection circuit 150 performs errordetection on the display image based on the index. The visibility indexis a numerical value that changes according to the visibility of anicon, and the shape index is a numerical value that changes according tothe similarity between an icon shape and a reference. The errordetection circuit 150 performs error detection by comparing theseindices with threshold values. The threshold value with respect to thevisibility index is a threshold value indicating allowable visibility,and the threshold value with respect to the shape index is a thresholdvalue indicating allowable similarity.

When the error detection circuit 150 detects an error, the imageprocessing circuit 135 stops outputting a display image to the interface140. Alternatively, when the error detection circuit 150 detects anerror, the interface 140 stops outputting a display image. The interface140 outputs a display image along with error information, and thedisplay driver that has received the error information may perform anoperation based on the error information. The error information is anerror determination flag, an index, or the like, for example. Theoperation based on the error information is stopping display or thelike, for example.

The register circuit 170 includes the error detection result register174 that stores an error detection result output from the errordetection circuit 150, and the processing circuit 200 reads out theerror detection result from the error detection result register 174 viathe interface 190. The error detection result is an error determinationflag that indicates whether or not an error has been determined withrespect to a display image, for example. The processing device 200performs an operation that is to be performed at the time when an erroris detected if the error detection result indicates an error. Theoperation that is to be performed at the time when an error is detectedis to stop transmitting image data to the circuit device 100, totransmit predetermined image data to the circuit device 100, or thelike, for example. The predetermined image data is image data of animage to be displayed to a user when an error is detected.

In the configuration in FIG. 2 as well, similarly to the configurationin FIG. 1, as a result of obtaining the visibility index and the shapeindex from an image subjected to image processing, the visibility of anicon and the similarity between an icon shape and a reference areevaluated, and an error can be detected based on the evaluation result.

A display controller that controls a display driver can be envisioned asthe circuit device 100 in FIG. 1 or 2 described above. Note that thecircuit device to which the method of the present embodiment can beapplied is not limited to the display controller. For example, thecircuit device may be a display driver that includes a function of thedisplay controller. In the case where the circuit device is a displaycontroller or a display driver, the circuit device is an integratedcircuit device (IC), for example. Note that the circuit device mayinclude a plurality of integrated circuit devices. For example, thecircuit device includes a display controller, which is a firstintegrated circuit device, and a processing device, which is a secondintegrated circuit device. In this case, the display controller includesan index acquisition circuit that acquires an index, and the processingdevice includes an error detection circuit that performs error detectionbased on the index received from the display controller.

2. Register Circuit

FIG. 3 shows an exemplary configuration of a register circuit when aplurality of foreground images are used. In FIG. 3, the interface 110and the CRC circuit 160 are not illustrated. Note that the constituentelements that are the same as the constituent elements that have beendescribed in FIGS. 1 and 2 will be denoted by the same reference signs,and the description thereof will be omitted, as appropriate.

As shown in FIG. 3, first to n^(th) images are stored in the memory 195as the foreground images. n is an integer of two or more. The foregroundimage is an image whose size is smaller than that of the backgroundimage, which is an input image. The first to n^(th) images are imageswhose shapes, sizes, and display positions relative to the backgroundimage are different to each other. In the following, a case where thefirst to n^(th) images are each a mask image for an icon will bedescribed as an example, but the first to n^(th) images are not limitedto mask images for an icon. The icon processing circuit 180 reads outone of the first to n^(th) images from the memory 195, and generates anicon image using the image as the mask image for the icon. The imageprocessing circuit 135 composites the icon image to the input image, andoutputs the composite image as the display image.

Note that the display image may be generated by compositing a pluralityof icon images to the input image. That is, the icon processing circuit180 reads out a plurality of images out of the first to n^(th) imagesfrom the memory 195, and generates icon images from the respectiveimages. In this way, a plurality of icon images are generated. The imageprocessing circuit 135 generates the display image by compositing aplurality of icon images to the input image.

The register circuit 170 includes the index register 171, a thresholdvalue register 172, an operation mode setting register 173, and an errordetection result register 174. n register values corresponding to the nforeground images are stored or set in each of the registers.

The index register 171 stores first to n^(th) indices corresponding tothe first to n^(th) images. That is, if an icon image generated from ani^(th) image is included in the display image, the index acquisitioncircuit 155 acquires an i^(th) visibility index for evaluating thevisibility of the icon, and an i^(th) shape index for evaluating thesimilarity between the shape of the icon and a reference as the i^(th)index. The index register 171 stores the i^(th) index. i is an integerof one or more and n or less. Note that the index acquisition circuit155 obtains one of the visibility index and the shape index, and theindex may be stored in the register 171 as the i^(th) index.

The processing device 200 sets first to n^(th) threshold valuescorresponding to the first to n^(th) images in the threshold valueregister 172 via the interface 190. Specifically, an i^(th) visibilityindex threshold value and an i^(th) shape index threshold value are setin the threshold value register 172 as an i^(th) threshold value. Theerror detection circuit 150 performs error detection by comparing thei^(th) index with the i^(th) threshold value. That is, the errordetection circuit 150 compares the i^(th) visibility index with thei^(th) visibility index threshold value, compares the i^(th) shape indexwith the i^(th) shape index threshold value, performs error detectionbased on the comparison results, and outputs the result as the i^(th)error detection result. For example, if at least one of the comparisonresults is a result indicating an error, it is determined that an errorhas occurred in the display image.

The error detection result register 174 stores first to n^(th) errordetection results corresponding to the first to n^(th) images. Thei^(th) error detection result indicates whether or not an error hasoccurred in the display image with respect to the i^(th) image. Theprocessing device 200 reads out the first to n^(th) error detectionresults from the error detection result register 174 via the interface190, and performs an operation based on the first to n^(th) errordetection results. Note that the error detection circuit 150 outputs oneerror detection result, and the error detection result register 174 maystore the one error detection result. That is, if any of the first ton^(th) error detection results indicates an error, the error detectioncircuit 150 outputs an error detection result indicating the error.Alternatively, if all of the first to n^(th) error detection resultsindicate that there is no error, the error detection circuit 150 outputsan error detection result indicating that there is no error, and theerror detection result register 174 may store the error detectionresult.

Note that in the case where the circuit device 100 acquires an index,and the processing device 200 performs error detection based on theindex, the error detection result register 174 may be omitted. In thiscase, the processing device 200 reads out the first to n^(th) indicesfrom the index register 171 via the interface 190, and performs errordetection based on the first to n^(th) indices.

The processing device 200 sets first to n^(th) pieces of mode settinginformation corresponding to the first to n^(th) images to the operationmode setting register 173 via the interface 190. The i^(th) piece ofmode setting information is information regarding an operation mode thatis set when the i^(th) error detection result indicates an error, andinformation regarding the operation to be performed when an error isdetected.

According to the above-described embodiment, the circuit device 100includes the image acquisition circuit that acquires image data, and theindex acquisition circuit 155 that obtains an index for performing errordetection on the display image based on the image data. Also, the indexacquisition circuit 155 obtains an index representing the degree ofdissimilarity between a foreground image, which is an image in a givenregion of the display image, and a background image, of the displayimage, corresponding to the background of the foreground image based onpixel values of the display image.

The image acquisition circuit corresponds to the interface 110 in FIG. 1or 2. Note that the image acquisition circuit needs only be a circuitthat acquires image data that has not been subjected to processing bythe image processing circuit 135, and is not limited to the interface110. For example, the image acquisition circuit may be a memory accesscircuit that reads out image data stored in an unshown memory.Alternatively, the image acquisition circuit may be the pre-processingcircuit 125 in FIGS. 1 and 2.

The display image based on image data is an image obtained by processingthe image data, and is an image to be displayed in a display panel. Asdescribed above, the display image is an image in which an icon iscomposited to an image represented by image data, for example.Alternatively, the display image is an image obtained by performingimage processing such as tone conversion processing on the imagerepresented by image data or the image to which an icon has beencomposited.

An image of a given region is an icon image, for example, as describedabove, but is not limited thereto, and may be an image that is to bedisplayed in a portion of the display image. Note that, in FIGS. 1 and2, an icon image, which is a foreground image, is composited to abackground image, but there is no limitation to this. That is, theforeground image is not limited to an image that is composited to abackground image, a portion of a display image that is to be an errordetection target is designated as the foreground image, and an indexwith respect to the foreground image may be obtained.

According to the present embodiment, an index representing the degree ofdissimilarity between a foreground image and a background image isobtained based on pixel values of the display image, and therefore, evenin a case where a data error detection method such as CRC cannot beused, error detection can be performed on the display image. That is,even in a case where image processing is performed on image data thathas been received along with a CRC value, and the image subjected to theimage processing is to be displayed as the display image, the visibilityof the foreground image can be evaluated using the index that representsthe degree of dissimilarity between the foreground image and thebackground image. Accordingly, display is performed when the visibilityof the foreground image is secured, and an error is determined when thevisibility of the foreground image is not secured. In this way, errordetection that does not use a known data error detection method such asCRC becomes possible.

Also, in the present embodiment, the image processing circuit 135 thatgenerates a display image by performing image processing on image datais included. The index acquisition circuit 155 obtains an index based onpixel values of the display image generated by the image processingcircuit 135.

As described above, the image subjected to image processing such as toneconversion processing is different from the image that the interface 110receives, and therefore a data error detection method such as CRC cannotbe applied. According to the present embodiment, as a result ofobtaining an index that represents the degree of dissimilarity between aforeground image and a background image, error detection can beperformed based on the index.

Also, in the present embodiment, the index acquisition circuit 155statistically obtains an index based on pixel values of the displayimage.

Obtaining an index statistically is to obtain an index by performingprocessing using a statistical method in which a plurality of pixelvalues included in the display image are the population of thestatistics. Specifically, a histogram is generated from the displayimage, and an index is obtained based on the histogram. Although adetailed description will be given later, an index is obtained byperforming a correlation operation on a histogram generated from thedisplay image and a histogram generated from the foreground image, forexample. Alternatively, an index is obtained by performing determinationprocessing on binary included in a histogram generated from the displayimage.

According to the present embodiment, as a result of statisticallyobtaining an index based on pixel values of the display image, an indexrepresenting the degree of dissimilarity between a foreground image anda background image can be obtained. That is, instead of detecting adefect in data as in a case of using CRC, the degree of dissimilaritybetween the foreground image and the background image is evaluated usinga statistical method, and whether or not an error is determined isdetermined based on the degree of dissimilarity.

Also, in the present embodiment, the circuit device 100 includes theimage acquisition circuit that acquires image data, the image processingcircuit 135 that performs image processing on the image data so as togenerate the display image, and the index acquisition circuit 155 thatobtains an index for performing error detection on the display image.The index acquisition circuit 155 obtains an index representing thedegree of matching between the foreground image, which is an image of agiven region of the display image, and a reference image, based on thepixel values of the display image and the pixel values of the referenceimage, which is a reference with respect to the foreground image, orbased on the pixel values of an edge image of the display image and thepixel values of an edge image of the reference image.

The reference image is an image that is expected to be displayed as theforeground image in the display image, and has the same shape as theforeground image. When the degree of matching between the foregroundimage and the reference image is high, the degree of matching betweenthe shape of the foreground image and the shape of the reference imagecan be determined to be high. According to the present embodiment,display is performed when the degree of matching between the foregroundimage and the reference image is high, and an error can be determinedwhen the degree of matching between the foreground image and thereference image is low. In this way, error detection that does not use aknown data error detection method such as CRC becomes possible.

Also, in the present embodiment, the circuit device 100 includes theindex register 171 that stores indices.

As a result of storing indices obtained by the index acquisition circuit155 into the index register 171, an index can be acquired from the indexregister 171 via an interface. For example, the processing device 200that is external to the circuit device 100 can acquire an index from theindex register 171 via the interface 190. Accordingly, the processingdevice 200 or the like that has acquired an index can perform errordetection on the display image based on the index.

Also, in the present embodiment, the circuit device 100 includes theerror detection circuit 150 that performs error detection on the displayimage based on an index.

In this way, the error detection circuit 150 incorporated in the circuitdevice 100 can perform error detection on the display image. Also, thecircuit device 100 can perform an operation that is to be performed atthe time when an error has been detected based on the error detectionresult. Alternatively, the error detection result is output to theprocessing device 200 and the like, and the processing device 200 andthe like can perform an operation that is to be performed at the timewhen an error has been detected based on the error detection result.

Also, in the present embodiment, the error detection circuit 150performs error detection by comparing a threshold value for determiningan error in the display image with an index.

In the data error detection method using CRC, whether or not an errorhas occurred in the image data is detected by comparing a CRC valuereceived along with the image data and a CRC value computed from thereceived image data. On the other hand, the index in the presentembodiment is not only an index that simply indicates whether or notthere is an error, but is also an index whose value changes according tothe degree of dissimilarity between the foreground image and thebackground image or the degree of matching between the foreground imageand the reference image. As a result of comparing the index with athreshold value, error detection can be performed even in a case where adata error detection method such as CRC cannot be used. That is, anerror can be determined when it is determined that visibility cannot besecured based on the degree of dissimilarity, or when it is determinedthat the similarity of the shapes cannot be secured based on the degreeof matching.

Also, in the present embodiment, the threshold value register 172 inwhich threshold values are set is included.

In this way, a threshold value to be compared with an index can be setto the threshold value register 172 via an interface. For example, theprocessing device 200 can set a threshold value to the threshold valueregister 172 via the interface 190. As a result of setting the thresholdvalue such that the value thereof can be changed, the degree ofvisibility or the degree of similarity between shapes at which an erroris determined can be changed. As a result of providing the thresholdvalue register 172, a user can freely set the threshold value, which isan error determination criterion, for example. The user is an operatorthat manufactures an electronic apparatus such as an on-board meterpanel, and a business operator that manufactures an automobile thatincludes such an electronic apparatus.

Also, in the present embodiment, the circuit device 100 includes thememory 195 into which first to n^(th) images are stored as theforeground image. First to n^(th) threshold values corresponding to thefirst to n^(th) images are set in the threshold value register 172, asthreshold values for determining an error in the display image. Theerror detection circuit 150 performs error detection, when performingthe error detection on the display image including the i^(th) image asthe foreground image, using the i^(th) threshold value.

In this way, the threshold value to be compared with an index can be setfor each image to be displayed as the foreground image. Accordingly, theallowable degree of visibility and similarity of shapes can be changedfor each image to be displayed as the foreground image. For example, inthe case where the foreground image is an icon image, a threshold valuewith which an error can be easily determined is set with respect to anicon that is not desired to be displayed when the icon is notdiscernible, and a threshold value with which an error cannot not beeasily determined can be set with respect to an icon for which it isdesirable to recognize that something is displayed even if the icon isnot discernible.

Also, in the present embodiment, the operation mode setting register 173in which the operation mode of the circuit device 100 when an error isdetermined in the display image by the error detection circuit 150 isset is included.

In this way, the operation mode of the circuit device 100 when an erroris determined in the display image can be set to the operation modesetting register 173 via an interface. For example, the processingdevice 200 can set an operation mode to the operation mode settingregister 173 via the interface 190. For example, the circuit device 100can be caused to perform the operation desired by the user when an erroris detected.

Also, in the present embodiment, a mode of reporting the result of errordetection to an external device external to the circuit device 100, amode of not displaying the display image, and a mode of displaying aspecific image as the display image are set as operation modes in theoperation mode setting register 173.

The result of error detection is information indicating whether or notan error has been detected, information indicating for which of thefirst to n^(th) images an error has been detected, and the like, forexample. The external device is the processing device 200, for example,which is an SoC, a CPU, or the like. The result of error detection isoutput to the external device via the interface 190, for example. Thedisplay image being not displayed is to set a display panel to a statein which an image is not displayed, and is to cause the display panel todisplay black or white over the entire display region, for example. Thespecific image is an image that is different from the display image,which is the target of the error detection, and is an image desired tobe displayed when an error is detected. For example, the specific imageis an image in which a message, a symbol, a color, or the like that isdesired to be presented to the user when an error is detected isdisplayed, for example. In the case of color, a predetermined color suchas red is displayed in the entirety of or a portion of the displayregion of the display panel, for example.

In this way, the operation mode of the circuit device 100 when an errorhas been determined in the display image can be set to one of theabove-described three modes. For example, the circuit device 100 can becaused to execute one of the above-described three modes, as theoperation desired by the user when an error is detected.

Also, in the present embodiment, first to n^(th) operation modescorresponding to the first to n^(th) images are set to the operationmode setting register 173. The i^(th) operation mode is the operationmode of the circuit device 100 when an error is detected in the displayimage by the error detection circuit 150, in the case where the errordetection circuit 150 has performed error detection on a display imagethat includes the i^(th) image as the foreground image.

In this way, the operation to be performed when an error is detected canbe set for each image that is to be displayed as the foreground image.For example, in the case of the foreground image being an icon image,what type of operation is to be performed when an error is detected inthe display of the icon can be set according to the type of icon.

Note that a case where circuits of the circuit device 100 execute thefunctions of the invention has been described above, but the functionsof the invention may be implemented as an error detection methoddescribed below.

That is, in the error detection method, image data is acquired, and anindex that represents the degree of dissimilarity between a foregroundimage, which is an image in a given region of a display image that isbased on the image data, and a background image corresponding to thebackground, of the display image, of the foreground image may beacquired based on the pixel values of the display image as an index forperforming error detection on the display image. Also, in the errordetection method, image data is acquired, a display image is generatedby performing image processing on the image data, and an index thatrepresents the degree of matching between a foreground image, which isan image of a given region of the display image, and a reference imagemay be obtained as an index for performing error detection on thedisplay image based on pixel values of the display image and pixelvalues of the reference image, which is a reference with respect to theforeground image, or pixel values of an edge image of the display imageand pixel values of an edge image of the reference image.

3. Index Acquisition Processing and Error Detection Processing

In the following, index acquisition processing to be performed by theindex acquisition circuit 155 and error detection processing to beperformed by the error detection circuit 150 will be described.

In an image processing system in which content is displayed in adisplay, there are cases where whether or not a predetermined region inan image matches the initially intended region needs to be confirmed.For example, a case where an important image is displayed in a clusterdisplay of an automobile system is considered. The cluster display is ameter panel display. Here, there are cases where a predetermined pieceof important information needs to be displayed via a visible imageoverlaid on existing content displayed in a screen. In the following,various methods for detecting whether or not an image is properlydisplayed will be described. The detection is performed by analyzing aregion of interest (ROI), and deriving some important indices thatindicate the degree of properness in displaying the region.

In the following, a method and concept in which a display image isverified relative to a reference will be used. This is achieved bycomputing a matching degree of the display image relative to thereference image. In the following, a case in which the region ofinterest (ROI) in a display image is considered will be described, butthe method can be easily extended so as to be applied to the entirety ofan image by setting the ROI to the boundary of the entire image. In thefollowing, an example in which an algorithm of the method of theinvention is applied to a color image will be described, but the methodof the invention can be applied to a grey scale image or a binary imageas well. The binary image is also referred to as a black-and-whiteimage.

FIG. 4 is a flowchart illustrating a processing flow of error detectionprocessing. In the error detection processing, image data is acquired(S0). Hereinafter, the image represented by the image data is referredto as an input image. Next, a display image is obtained by overlaying anicon image on the input image (51, S2). Next, error detection processingis performed (S4) by comparing a reference image (S3) and the displayimage (S2) so as to obtain an index (S5). Note that the reference imageis not necessarily acquired. For example, there are cases where, when avisibility index is obtained, the index is calculated using only adisplay image without using a reference image. Next, error detection isperformed (S6) by comparing the index with a threshold value.

In index acquisition processing and error detection processing, thevalidity of the display image or a portion of the display image isconfirmed by comparing the display image with a reference image. In theabove comparison, a color shift, a change in luminance, and a change dueto scaling or a predetermined intentional image conversion are notdetected as an error, and an important error such as a deformationcaused by an unintentional rotation, or an error or the like caused bycropping or noise that makes it impossible for a user to recognize theimage is detected.

In order to do so, two indices, namely a visibility index and a shapeindex are used. The visibility index is a numerical value that isprescribed so as to represent the degree of visibility, that is, thedegree according to which an image of a region of interest can berecognized without blending into the background. Note that the region ofinterest can be defined so as to include the entirety of an image.

As described above, the index acquisition processing and the errordetection processing are applied to a color image. Note that the indexacquisition processing and the error detection processing can also beapplied to a black-and-white or grey scale image by using one channelfor grey or using only two values in one channel for a binary image. Inorder to do so, pixels of a region of interest in a display image areconverted from an RGB format to a YCbCr format. Note that the method ofthe invention can be applied to another color space as well. The othercolor space is Lab, Hsv, or the like.

3. 1. First Computation Method for Obtaining Visibility Index (FirstIndex)

FIG. 5 shows a histogram of YCbCr channels in a region of interest.Also, FIG. 6 shows self-correlation values obtained by performing aself-correlation operation on the histogram.

As shown in FIG. 5, a histogram is obtained for each channel of a YCbCrimage using n binaries. For example, 256 binaries are used, and ahistogram that includes a set of different binaries can be generated.

The histogram is generated by counting the number of occurrences of aspecific value in a region of interest. That is, for each of thechannels of a YCbCr image, the number of pixels that have a valueindicated by each binary is counted in the region of interest. Next, thehistogram is normalized to have a value from 0 to a. The value “a” canbe selected considering ease of in implementation. For example, a can beset to one, 255, or the like. In FIG. 5, a=1. Next, a cross-correlationoperation is performed on the histogram for each channel with itself.That is, a self-correlation operation is performed on the histogram.Then, a resultant self-correlation signal is used in an analysisthereafter. As shown in FIG. 6, the self-correlation signal isnormalized such that the peak value at zero delay is one or a pre-setvalue.

The self-correlation value can be obtained using the following Equation(1). f and g represent functions on which correlation operation isperformed, and f=g in the case of self-correlation. The signal to beinput as a function is the histogram, here. f*g represents thecorrelation operation between the function f and the function g. f*represents a complex conjugate of the function f, and f*=f in thepresent embodiment. m represents the number of binaries in thehistogram. n represents a delay (lag), and n is an integer from −255 to+255, in FIG. 6.

$\begin{matrix}{\left\lbrack {{Math}.\mspace{14mu} 1} \right\rbrack\mspace{625mu}} & \; \\{{\left( {f*g} \right)\lbrack n\rbrack} = {\sum\limits_{m = {- \infty}}^{\infty}{{f^{*}\lbrack m\rbrack}{g\left\lbrack {m + n} \right\rbrack}}}} & (1)\end{matrix}$

Note that, 256 binaries are normalized to values from 0 to 1 in thehistogram in FIG. 5, and therefore the horizontal axis shows a valuefrom 0 to 1. The correlation values in FIG. 6 are obtained by changingthe delay by one binary, and therefore the horizontal axis shows valuesfrom −(256−1) to +(256−1).

As shown in FIG. 6, when a two-color image exists in the region ofinterest, sidebands are obtained through the self-correlation operation.The distance of the delay from the center at which the above-describedpeak occurs indicates the contrast between colors. The centercorresponds to zero delay. Because the human eye can distinguishfeatures of an image through a contrast, the peaks of all the threechannels need to be checked. The contrast is a luminance contrast orcolor contrast, for example. In FIG. 6, the Y channel is indicated bybroken lines, the Cb channel is indicated by thin solid lines, and theCr channel is indicated by thick solid lines. The checking is performedby setting a threshold value for a peak search such that noise in theself-correlation signal is not picked up. For example, the minimum peakthreshold is set to 0.05. The local maximum value is obtained bysearching for the peak in the signal. The peak to be searched for is apeak having a peak value that is larger than the threshold value.

Note that the minimum distance between successive peaks can be set to apredetermined value in order to evade an in-band signal peak. Thesethreshold values are adjustable values and appropriate values areselected according to the application.

In order to obtain a first index that indicates whether or not adistinguishable image is displayed on a background having two or morecolors, all of the peaks in the self-correlation signal exceeding anoise threshold value are obtained with respect to all of the channels,and thereafter, the maximum distance at which a peak occurs, that is,the maximum delay is obtained. The maximum value of the delays at whichpeaks occur in three channels is selected as the index that indicatesvisibility.

In a correlation plot shown in FIG. 6, peaks are indicated with circles.In the illustrated example, the Cr channel shows the maximum separation,and the distance is 184. This value is normalized to a conceivablemaximum delay. For example, the conceivable maximum delay is 256, whichis the number of binaries in the histogram. Therefore, the index valueis 184/255=0.722. In an image shown in FIG. 7, this index value is shownas a Vis parameter. This computation is illustrated with respect to oneexample.

FIG. 7 shows a first example of the display image. Because the displayimage is an image to be analyzed, the display image is also referred toas an analysis image. A1 indicates the region of interest, and A2indicates an icon. Note that the broken line that shows the region ofinterest is not actually rendered in the display image. For example, theinside of the icon A2 that is a portion illustrated by black in FIG. 7is red, and the background that is a portion illustrated by white inFIG. 7 is green.

In the image in FIG. 7, there are two pixel groups, namely a red pixelgroup and a green pixel group, in the region of interest, and therefore,in the histogram shown in FIG. 5, two peaks, one of which is large andthe other is small, occur for each YCbCr channel. For example, in the Crchannel, peaks occur at binaries Ba and Bb. The distance between the twopeaks represents the contrast between the color of a foreground icon,which is the icon, and the color of the background, and the larger thedistance, the larger the difference between the colors of the foregroundand the background. The distance between two peaks in the histogram isthe distance of the delay at which a peak occurs in the self-correlationvalues shown in FIG. 6. Since the foreground icon, which is the icon, isred and the background is green, in the image in FIG. 7, the distancebetween two peaks with respect to the Cr channel is the largest distancein the histogram shown in FIG. 5, and the distance is |Ba−Bb|×255. Thisis detected as the maximum distance at which a peak occurs in theself-correlation value shown in FIG. 6, and the normalized index valueis |Ba−Bb|. Accordingly, the larger the contrast between the color ofthe foreground icon, which is the icon, and the color of the background,the larger the visibility index value.

The error detection circuit 150 performs error detection based on thevisibility index obtained as described above. For example, thevisibility index is compared with a given threshold value, and if thevisibility index is smaller than the given threshold value, an error isdetermined. Alternatively, the visibility index may be output to adevice external to the circuit device 100 as the error detection result.

3. 2. Second to Fourth Computation Methods of Obtaining Visibility Index

In a second computation method, the visibility index is obtained using across-correlation operation.

In the first computation method, the reference visibility inside aregion of interest is checked using a self-correlation operation. Thereference image in this case does not include information regarding acolor or the like of the background image. Therefore, only a compositeimage, which is the display image, is analyzed to check whether or notthe composite image includes two or more colors.

In the second computation method, a case where the reference imageincludes total information, that is, a source image is changed byperforming display processing, for example, is envisioned. In this case,a histogram of the reference image is generated using a method similarto the method of generating the histogram of an analysis image, and across-correlation operation between histogram signals of the referenceimage and the analysis image can be performed instead of theself-correlation operation. Mathematically, the self-correlationoperation is a cross-correlation operation performed on the signalitself. Therefore, the cross-correlation operation or theself-correlation operation can be performed by merely changing thesignal to be input to the correlation operation. That is, in Equation(1), the histogram of the reference image is one of the functions f andg, and the histogram of the display image is the other of the functionsf and g.

In the case of the cross-correlation operation, whether or not there isa peak having a height that exceeds a predetermined threshold value in across-correlation signal is checked instead of obtaining the distance ofthe peak from the central point. If there is such a peak, the analysisimage matches the reference image to a substantial degree, as long asthe pixel distribution is considered. Accordingly, error detection at afirst level can be performed on the analysis image. This parameter doesnot indicate spatial correlation, and indicates only pixel distributioncorrelation. The index in this case is not the distance of a peak fromthe central point in the case of the self-correlation operation, and maybe the peak value itself.

FIG. 8 shows an example of a histogram when the foreground such as anicon is multi-tone having two or more colors. FIG. 9 shows an example ofthe cross-correlation values of the histogram in FIG. 8. Here, adescription will be given with respect to one channel of a color image,but similar processing is performed on a plurality of channels. Forexample, the maximum peak value of peaks in the cross-correlation valueswith respect to the plurality of channels may be adopted.

As shown in FIG. 8, three or more peaks occur in the histogram of thedisplay image, which is a composite image, and the reference image. Inthe example in FIG. 8, there are four peaks. Assume that the peaks inthe histogram of the display image shifts from the peaks in thehistogram of the reference image by Bn. In this case, as shown in FIG.9, a large peak appears at a delay Bn in the cross-correlation value. Ifthe peak value of this peak is larger than a threshold value Thr, thepeak value is adopted as the visibility index value, for example.

In a third computation method, a ratio of contrast between theforeground and the background is obtained as the visibility index value.

In the first computation method, the difference |Ba−Bb| between binariesBa and Bb at which peaks occur in the histogram of the Cr channel isused as the visibility index value.

In the third computation method, a contrast ratio |Ba—Bb|/Ba or|Ba—Bb|/Bb is obtained, and the contrast ratio is used as the visibilityindex value. Alternatively, in the case of using a reference image suchas the case of the second computation method, C1=|Ba—Bb| in the displayimage, and C2=|Ba—Bb| in the reference image are obtained, a contrastratio C1/C2 or C2/C1 is obtained, and the contrast ratio is used as thevisibility index value.

In a fourth computation method, a multi-dimensional histogram isgenerated so as to obtain the visibility index.

In the first computation method one-dimensional histogram for eachchannel is used to analyze the visibility.

In the fourth computation method, a multi-dimensional histogram isgenerated from signals of a plurality of channels, and amulti-dimensional correlation operation is performed on themulti-dimensional histogram so as to obtain the visibility index. Themulti-dimensional correlation operation is a multi-dimensionalself-correlation operation or a multi-dimensional cross-correlationoperation. Accordingly, it is possible to favorably simulate contrastdetection by human eyes. There are cases where more favorableperformance can be obtained by using a 3D color histogram.

According to the above-described embodiment, the circuit device 100includes the image processing circuit 135 that acquires a display image,and the error detection circuit 150 that performs error detection on thedisplay image. Also, the index acquisition circuit 155 obtains ahistogram (FIG. 5) of pixel values (each of YCbCr channels) of thedisplay image, and performs a correlation operation using the histogram(FIG. 6). The index acquisition circuit 155 obtains an index (visibilityindex, first index) that represents the degree of dissimilarity betweena foreground image, which is an image of a given region of the displayimage, and a background image, of the display image, corresponding tothe background of the foreground image based on a result of acorrelation operation. The error detection circuit 150 performs errordetection based on the index.

In this way, error detection, which is not bit-wise error detection suchas CRC, can be performed on the display image based on the index thatrepresents the degree of dissimilarity between the foreground image andbackground image of the display image. When the dissimilarity degree ofthe foreground image relative to the background image is high, thelikelihood that the foreground image will be visually distinguished fromthe background image is high, and the visibility of the foreground imageis considered to be high. That is, according to the present method, anerror can be determined when the visibility of the foreground image islow. For example, an icon or the like for warning a user is displayed inan on-board meter panel or the like. According to the presentembodiment, the display of such an icon is not stopped due to a one-biterror or the like, and the icon is displayed as much as possible to warnthe user while the visibility of the icon is secured.

Here, in FIGS. 1 and 2, the image processing circuit 135 is an OSD, butthere is no limitation thereto, and the image processing circuit 135needs only be a circuit for acquiring an arbitrary display image. Adetailed description will be given in “4. Modifications”. Also, thedisplay image is an image generated or the like to be displayed in adisplay (display device). In the above-described embodiment, the displayimage is an image rendered by the OSD, but there is no limitationthereto, and may be an image generated by performing some imageprocessing, an image received through communication, an image read outfrom a memory, or the like.

Also, the error detection is to output an error detection result basedon the index, and is to determine whether or not there is an error inthe display image based on the index, for example. Alternatively, theerror detection may be to output the index as an error detection result.For example, the value of the index increases as the degree ofdissimilarity between the foreground image and the background imageincreases. In this case, it is determined that the display imageincludes an error if the index is less than a given value.

Also, the foreground image is an image of a region, of the displayimage, with respect to which the degree of dissimilarity from thebackground image is determined by the index. Also, the region is a givenregion. For example, a mask image for designating the foreground isprepared. For example, the mask image is stored in the memory 195 or thelike. The pixels in the foreground image, which are the pixels in thegiven region, are specified using pixels that define the foreground inthe mask image. For example, pixels in the foreground image arespecified by pixels having a value of “1” in a 1-bit mask, for example.More specifically, the position on the display image to which the maskimage that defines the foreground is designated, and the foreground isspecified by the position and the mask image. For example, the positionat which an icon is overlaid is designated, and the foreground isspecified by the position and the mask image.

Also, the background image is an image of a portion or the entirety ofthe display image excluding the foreground image. That is, a region ofinterest, which is a region including the foreground image, is set to aportion or the entirety of the display image, and the image of a regionof the region of interest excluding the foreground image is thebackground image. For example, the pixels of the background image arespecified by the pixels that define the background in the mask image.The pixels that define the background are pixels having a value “0” inthe 1-bit mask, for example.

Also, the degree of dissimilarity is a degree of dissimilarity in eachcomponent that is a constituent component in a color space. Aconstituent component is also referred to as a channel. For example inthe YCbCr space, the degree of dissimilarity represents the degree ofdifference between the luminance of the foreground image and theluminance of the background image, or the degree of difference betweenthe color of the foreground image and the color of the background image.Alternatively, in the RGB space, the degree of dissimilarity representsthe degree of difference between the color of the foreground image andthe color of the background image.

Also, in the present embodiment, the index acquisition circuit 155obtains histograms of the respective constituent components in the colorspace (FIG. 5), performs a self-correlation operation on each of thehistograms of the constituent components, obtains distances at whichself-correlation peaks occur with respect to the respective components(FIG. 6), and obtains an index based on the maximum distance of theobtained distances. The maximum distance is |Ba−Bb| in FIG. 6, and theindex here is the visibility index.

In this way, the index can be obtained using the component having themaximum difference between the foreground image and the backgroundimage, of the constituent components in the color space. The componenthaving the maximum difference between the foreground image and thebackground image is considered to be a component that is visuallyrecognized to have a large difference, and therefore, as a result ofobtaining the index using the component, the degree of dissimilaritybetween the background and the foreground can be evaluated. Also, thevisibility of the foreground can be appropriately evaluated using thisindex.

Here, the index needs only be a value obtained based on the maximumdistance |Ba—Bb|. For example, in the first computation method, theindex is the maximum distance |Ba—Bb| itself. Also, in the secondcomputation method, the index is a contrast ratio based on the maximumdistance |Ba—Bb|. The contrast ratio is |Ba—Bb|/Ba or the like, forexample.

Also, in the present embodiment, the index acquisition circuit 155obtains first histograms of respective constituent components in thecolor space from the display image as histograms, and obtains secondhistograms of the respective components from a reference imagecorresponding to the foreground image (FIG. 8). The index acquisitioncircuit 155 performs a cross-correlation operation on the firsthistogram and the second histogram for each component, and obtains theindex based on the peak value of the cross-correlation peak (FIG. 9).

In this way, even if the reference image is in multiple tones includingtwo or more colors, the index representing the degree of dissimilaritybetween the foreground image and the background image can be obtained.That is, although two or more peaks occur in the histogram of thereference image, if the same pattern as this histogram is included inthe histogram of the display image, it can be determined that an imagesimilar to the reference image, in at least a color or luminancepattern, is included in the display image. In this case, a large peak isto occur in a result of cross-correlation operation, and thus thevisibility of the foreground can be appropriately evaluated by obtainingthe index from the peak value.

Here, the reference image is an image corresponding to the foregroundimage when the foreground image is properly displayed in the displayimage. More specifically, the reference image is an image that is thesame as the foreground image at least with respect to the peak patternin the histogram. Here, the relative positional relationship of thepeaks needs only be the same, as shown in FIG. 8, and the pattern may beshifted as a whole.

Also, in the present embodiment, the index acquisition circuit 155obtains a second index (shape index) that represents the degree ofmatching between the foreground image and the reference image based onpixel values of the display image and pixel values of the referenceimage, which is the reference with respect to the foreground image, orbased on edges in the display image and edges in the reference image.The error detection circuit 150 performs error detection based on thefirst index (visibility index) and the second index (shape index).

In this way, error detection can be performed on the display image bycombining two indices that are obtained by evaluating properties thatare different from each other. That is, as a result of combining anindex that represents the degree of dissimilarity, in luminance orcolor, between the foreground image and the reference image, and thesecond index that represents the degree of matching, in shape, betweenthe foreground image and the reference image, highly accurate errordetection can be performed on the display image. Note that the detailsof the second index (shape index) will be described later.

Also, in the present embodiment, the image processing circuit 135generates a display image by overlaying a second image on a given regionof a first image. The background image is an image corresponding to thefirst image, of the display image.

In this way, the display image can be generated by overlaying an icon, acharacter, or the like on the input image by the OSD. In this case, thecharacter or icon corresponds to the foreground image, and a portion ofthe original input image other than this corresponds to the backgroundimage. In the present embodiment, as a result of performing such errordetection on the display image, an error can be determined when an iconor a character has not been properly overlaid (that is, is visuallyrecognizable to a user) in an OSD. On the other hand, even if aprocessing error has occurred to a degree of one bit in overlaying, anerror is not determined if the visibility is secured, and therefore anicon or a character can be displayed to a user.

Also, the present embodiment can be implemented as a following errordetection method as well. That is, in this method, a histogram of pixelvalues of the display image is obtained, a correlation operation isperformed using the histogram, an index representing the degree ofdissimilarity between a foreground image, which is an image in a givenregion of the display image, and a background image, of the displayimage, corresponding to the background of the foreground image isobtained based on the result of correlation operation, and errordetection is performed on the display image based on the index.

Also, the present embodiment can be implemented as a following errordetection method. That is, in this method, a region of interest in thedisplay image is analyzed, and an index that describes the visibility ofthe foreground relative to the background is computed. Here, a referenceimage may be used as a mask in order to specify the foreground. Theindex can be computed by using a following technique (a) or (b). (a) Theseparation between the foreground and the background is searched forusing a histogram of the display image. (b) The contrast ratio betweenthe foreground and the background is calculated.

3. 3. First Computation Method of Shape Index (Second Index)

The shape index is an index that indicates whether or not the shape of aregion of interest in the display image, which is an analysis image,matches that of the reference image. In the following, the computationmethod of the shape index will be described.

First, pixel blocks in the ROI of the analysis image are averaged suchthat the size of the ultimate averaged image is m×n pixels. Thissubsampling processing is performed such that a small number of pixelerrors are not detected as an important error, and the entire shapes ofthe reference image and the analysis image are confirmed while ignoringthese errors. The errors desired to be ignored are color shift, slightdistortion, and the like. In order to obtain a complete match, theresolution of the image obtained through subsampling can be increased.The value m×n can be selected according to the application. As will bedescribed later, when used in relation to the reference image, the valuem×n is selected based on sample data observation.

When the region of interest of the analysis image includes u×v pixels,the averaging block size is u/m×v/n pixels. When reference backgroundinformation cannot be used, pixels of a portion of the analysis image inwhich reference pixels do not exist are deleted. This operationcorresponds to reference foreground masking. This is performed becauseit is necessary that the baseline with respect to background pixels ismatched (aligned, put under the same condition) between the referenceimage and the analysis image. The baseline being matched means beingaligned or being put under the same conditions. Therefore, the values ofthe background pixels are set to the same value both in the analysisimage and the reference image.

The reference image is also averaged so as to have a size of m×n pixels.Averaging is performed separately on each of the channels. FIG. 10 showsan example of the reference image. A foreground F1, which is an icon ofa reference image RIA is colored, and a background, which is a regionother than the icon, is not colored, that is black, for example. In FIG.10, the size of the reference image RIA is 256×256 pixels. FIG. 11 showsan averaged image of the reference image. In FIG. 11, m=n=16, and thesize of an averaged image SRef is 16×16 pixels. Since the backgrounds ofthe reference image and its averaged image are not colored, thebackground of a region of interest of the analysis image is madecolorless, and an averaged image of the image of the region of interestis obtained. For example, the background is made colorless by deletingthe background.

Next, the averaged image (SRef m×n) of the reference image and theaveraged image (SAnz m×n) of the region of interest of the analysisimage are compared pixel by pixel using a distance reference, and adistance D is obtained using Equation (2). The distance D is athree-dimensional distance. In the present embodiment, the distancereference is a square of Cartesian distance, but a similar parameter canbe obtained with another distance reference.

$\begin{matrix}{\left\lbrack {{Math}.\mspace{14mu} 2} \right\rbrack\mspace{625mu}} & \; \\{D = {\sum\limits_{c = 1}^{3}{\sum\limits_{y = 1}^{n}{\sum\limits_{x = 1}^{m}\left( {\left\lbrack {R_{xyc} - R_{c}^{\prime}} \right\rbrack - \left\lbrack {A_{xyc} - A_{c}^{\prime}} \right\rbrack} \right)^{2}}}}} & (2)\end{matrix}$

c represents the channel, x represents the pixel position in theaveraged image in a lateral direction, and y represents the pixelposition in the averaged image in a longitudinal direction. The lateraldirection is also referred to as a horizontal direction, and thelongitudinal direction is also referred to as a vertical direction. mand n represent the size of the averaged image. R_(xyc) represents thepixel value at a position (x, y) in the averaged image of the referenceimage in the channel c. R′_(c) represents an average value of R_(xy)pixels in the channel c. The average value of the R_(xy) pixels isobtained by averaging the R_(xyc) values inside the averaged image.A_(xyc) represents the pixel value at a position (x, y) in the averagedimage of the analysis image in the channel c. A′_(c) represents anaverage value of A_(xy) pixels in the channel c. The average value ofthe A_(xy) pixels is obtained by averaging the A_(xyc) inside theaveraged image.

The reason why the average value is subtracted in each channel is tomake a small color shift between the reference image and the analysisimage to not be treated as an error. When complete matching is required,the average value can be set to 0. In this case, matching of the shapeand color is checked using the distance reference.

The display image, which is an analysis image, is an image shown in FIG.7, for example. The region of interest A1 is extracted at a periphery ofa region in which the reference image is composited to an input image.In FIG. 7, the region of interest is shown by a broken line quadrangle.

The shape index S is derived from the distance parameter using thefollowing Equations (3) and (4). The shape index S is also referred toas a shape parameter. T is a threshold value, and can adopt any value.If D<T, T/D=1, the shape index S does not change.

$\begin{matrix}{\left\lbrack {{Math}.\mspace{14mu} 3} \right\rbrack\mspace{625mu}} & \; \\{S = {f\left( \frac{T}{D} \right)}} & (3) \\{\left\lbrack {{Math}.\mspace{14mu} 4} \right\rbrack\mspace{625mu}} & \; \\{D = {{T\mspace{14mu}{if}\mspace{14mu} D} < T}} & (4)\end{matrix}$

The function f is selected so as to be easily implemented by hardware.For example, the function f may be a scaling function K that scales arange from 0 to 1 to a range from 0 to k, for example. In an exampledescribed below, the function f is a unit function. That is, S=T/D. Theshape index S represents the degree of matching of the shape between thereference image and the analysis image. When the images do not match,this value decreases, and has tendency to become 0. This example will bedescribed in the following.

In FIG. 7, the icon, which is the reference image, is properly displayedin the analysis image. In this case, the shape index S=1, andShape:1.000 are illustrated in FIG. 7.

FIG. 12 shows a second example of the display image. B1 indicates theregion of interest. As indicated by B2 in FIG. 12, the icon, which isthe reference image, is not clear in the analysis image. That is, someof the reference pixels do not exist in the analysis image, and if thefunction f is a unit function, the shape index S takes a value of lessthan one. In the case of such an unclear foreground, both the visibilityindex and the shape index take a small value.

FIG. 13 is a third example of the display image. E1 indicates the regionof interest. As indicated by E2 in FIG. 13, the icon, which is thereference image is rotated in the analysis image. In this example, sincethe shape is rotated from the reference, if the function f is a unitfunction, the shape index S takes a value of less than one. When theforeground is rotated in this way, the visibility index takes arelatively large value, and the shape index takes a small value. Bycombining the visibility index and the shape index in this way,appropriate error detection can be performed in various foregroundstates, and the accuracy of the error detection can be improved.

Note that a case where the analysis image and the reference image areavailable as images has been described, but the target to which theinvention can be applied is not limited thereto. For example, the samecomputation can be easily performed in the case where the image isstreamed as a line, a pixel, or a sub-image as well.

The above-described shape index only checks matching in the base signal.In the case of an image whose visibility is low, after generating afirst-order gradient image by convoluting an edge detection kernel withthe region of interest of the analysis image and the reference image,parameters can be obtained using a shape computation algorithm. The edgedetection kernel is Laplacian, Sobel, or the like, for example. Usingthe obtained parameters, an error in detection that has occurred basedon the shape index can be excluded. In this way, even in a case of animage having low visibility, a proper error detection result can beobtained.

3. 4. Second Computation Method of Shape Index

FIG. 14 shows a fourth example of the display image. In FIG. 14, anexample in which an icon ICA is overlaid on a dashboard image DIM isshown. The foreground and background of the icon image are separatelyalpha-blended with the dashboard image. In the above case, while theforeground of the icon image is partially blended, the background of theicon image is completely blended. Here, the foreground of the icon imageis an icon portion of the icon image. In FIG. 15, the icon portion isconstituted by pixels corresponding to bit “1” in a mask image MSB, andis a portion shown by black. The background of the icon image is aportion other than the icon in the icon image. In FIG. 15, the portionother than the icon is constituted by pixels corresponding to bit “0” inthe mask image MSB, and is a portion shown by white. In the backgroundof the icon image, the icon image and the dashboard image DIM areblended at a ratio of 0:1. In the foreground of the icon image, the iconimage and the dashboard image DIM are blended at a ratio of α:(1−α),where 0<α<1. The icon blended at a ratio of a is the foreground in thedisplay image, and the other regions are the background in the displayimage.

In the present embodiment, the relationship between this icon and theoriginal icon is analyzed, and whether the icon is properly displayed ischecked. Specifically, edges are detected in the region of interestsimilarly to the reference using an edge detection technique. The edgedetection technique is an edge detection technique that uses a Sobeledge detection convolution operator, for example.

FIG. 15 shows a first example of the reference image, the region ofinterest of a display image, and the mask image. The mask image MSB is amask that indicates the foreground and the background of the referenceimage ICB, a black portion indicates foreground pixels, and a whiteportion indicates background pixels. The reference image ICB, which isthe reference icon, is an image in which the foreground, which is theicon indicated by a grey portion in the diagram, is colored. The displayimage CIB, which is a display icon, is an image of the region ofinterest in which the reference image ICB is blended into the dashboardimage DIM. As a result of blending, the dashboard image DIM can be seenthrough the icon in the icon portion.

FIG. 16 shows an example of edge values calculated from the referenceimage and the display image. EICB indicates an edge image of thereference image ICB, and ECIB indicates an edge image of the displayimage CIB. For the sake of illustration, edges are shown by black linesand grey lines, but the strength of an edge can be shown in grey scalein actuality. A white portion indicates an edge at high intensity, and ablack portion indicates no edge. This edge detection is performed on aluminance channel. Similarly, the edge detection is performed on a colorchannel or in a color space such as YCbCr as well.

Edges in the foreground region and a background region are calculatedwith respect to the reference image and the display image, and the shapeindex is calculated by calculating a similarity amount as shown in thefollowing Equations (5) to (16). Match in the following Equation (16) isthe shape index. The shape index is also referred to as a conformityvalue. In the following, it is assumed that the reference image has asize of m×n pixels, and the region of interest of the display image hasthe size of m×n pixels as well.

The following Equation (5) is a horizontal Sobel kernel, which is aSobel filter operator for detecting edges in a horizontal direction. Thefollowing Equation (6) is a vertical Sobel kernel, which is a Sobelfilter operator for detecting edges in a vertical direction.

$\begin{matrix}{\left\lbrack {{Math}.\mspace{14mu} 5} \right\rbrack\mspace{625mu}} & \; \\{F_{H} = \begin{bmatrix}1 & 0 & {- 1} \\2 & 0 & {- 2} \\1 & 0 & {- 1}\end{bmatrix}} & (5) \\{\left\lbrack {{Math}.\mspace{14mu} 6} \right\rbrack\mspace{625mu}} & \; \\{F_{V} = \begin{bmatrix}1 & 2 & 1 \\0 & 0 & 0 \\{- 1} & {- 2} & {- 1}\end{bmatrix}} & (6)\end{matrix}$

As shown in the following Equations (7) to (12), an edge value iscalculated at each pixel position in the reference image and the regionof interest of the display image. “*” is a convolution operator. N is anormalization factor for keeping values in a region from 0 to 1, andN=4, here. IRef is a luminance (Y) channel of the reference image.IRef_((x, y)) is a pixel at the position (x, y) in the luminance channelof the reference image. x is an integer that satisfies 0<x≤m, and y isan inter that satisfies 0<y≤n. IRen is a luminance channel of thedisplay image in the region of interest. IRen_((x, y)) indicates 3×3pixels that are centered at a position (x, y) in the luminance channelof the display image in the region of interest.

$\begin{matrix}{\left\lbrack {{Math}.\mspace{14mu} 7} \right\rbrack\mspace{610mu}} & \; \\{{E1_{({x,y})}} = {- \frac{\begin{bmatrix}{E\; 1_{H}} \\{E\; 1_{V}}\end{bmatrix}_{({x,y})}}{N}}} & (7) \\{\left\lbrack {{Math}.\mspace{14mu} 8} \right\rbrack\mspace{610mu}} & \; \\{{E\; 1_{H{({x,y})}}} = {F_{H}*I\;{Ref}_{({x,y})}}} & (8) \\{\left\lbrack {{Math}.\mspace{14mu} 9} \right\rbrack\mspace{610mu}} & \; \\{{E\; 1_{V{({x,y})}}} = {F_{V}*I\;{Ref}_{({x,y})}}} & (9) \\{\left\lbrack {{Math}.\mspace{14mu} 10} \right\rbrack\mspace{599mu}} & \; \\{{E\; 2_{({x,y})}} = \frac{\begin{bmatrix}{E\; 2_{H}} \\{E\; 2_{V}}\end{bmatrix}_{({x,y})}}{N}} & (10) \\{\left\lbrack {{Math}.\mspace{14mu} 11} \right\rbrack\mspace{599mu}} & \; \\{{E\; 2_{H{({x,y})}}} = {F_{H}*{IRen}_{({x,y})}}} & (11) \\{\left\lbrack {{Math}.\mspace{14mu} 12} \right\rbrack\mspace{599mu}} & \; \\{{E2_{V{({x,y})}}} = {F_{V}*{IRen}_{({x,y})}}} & (12)\end{matrix}$

As shown in the following Equations (13) to (16), the shape index Match(conformity value) is obtained from the above-described edge values. “·”represents an inner product operator.

$\begin{matrix}{\left\lbrack {{Math}.\mspace{14mu} 13} \right\rbrack\mspace{599mu}} & \; \\{S = {\sum\limits_{y = 0}^{n}{\sum\limits_{x = 0}^{m}{E\;{1_{({x,y})} \cdot E}\; 2_{({x,y})}}}}} & (13) \\{\left\lbrack {{Math}.\mspace{14mu} 14} \right\rbrack\mspace{599mu}} & \; \\{{T\; 1} = {\sum\limits_{y = 0}^{n}{\sum\limits_{x = 0}^{m}{E\;{1_{({x,y})} \cdot E}\; 1_{({x,{.y}})}}}}} & (14) \\{\left\lbrack {{Math}.\mspace{14mu} 15} \right\rbrack\mspace{599mu}} & \; \\{{T\; 2} = {\sum\limits_{y = 0}^{n}{\sum\limits_{x = 0}^{m}{E{2_{({x,y})} \cdot E}\; 2_{({x,y})}}}}} & (15) \\{\left\lbrack {{Math}.\mspace{14mu} 16} \right\rbrack\mspace{599mu}} & \; \\{{Match} = \frac{S}{\left( {{T1} + {T2}} \right)/2}} & (16)\end{matrix}$

When the above-described computations are applied to FIGS. 15 and 16,Match=0.78 is obtained.

In the case where the conformity value is required to be calculatedwithout analyzing the background, calculations shown in the followingEquations (17) to (22) are used.

$\begin{matrix}{\left\lbrack {{Math}.\mspace{14mu} 17} \right\rbrack\mspace{596mu}} & \; \\{{E1_{({x,y})}^{f}} = {E1_{({x,y})}M_{({x,y})}}} & (17) \\{\left\lbrack {{Math}.\mspace{14mu} 18} \right\rbrack\mspace{590mu}} & \; \\{{E\; 2_{({x,y})}^{f}} = {E2_{({x,y})}M_{({x,y})}}} & (18) \\{\left\lbrack {{Math}.\mspace{14mu} 19} \right\rbrack\mspace{599mu}} & \; \\{S^{f} = {\sum\limits_{y = 0}^{n}{\sum\limits_{x = 0}^{m}{E{1_{({x,y})}^{f} \cdot E}\; 2_{({x,y})}^{f}}}}} & (19) \\{\left\lbrack {{Math}.\mspace{14mu} 20} \right\rbrack\mspace{599mu}} & \; \\{{T\; 1^{f}} = {\sum\limits_{y = 0}^{n}{\sum\limits_{\lambda = 0}^{m}{E{1_{({x,y})}^{f} \cdot E}\; 1_{({x,y})}^{f}}}}} & (20) \\{\left\lbrack {{Math}.\mspace{14mu} 21} \right\rbrack\mspace{599mu}} & \; \\{{T\; 2^{f}} = {\sum\limits_{y = 0}^{n}{\sum\limits_{x = 0}^{m}{E\;{2_{({x,y})}^{f} \cdot E_{({x,y})}^{f}}}}}} & (21) \\{\left\lbrack {{Math}.\mspace{14mu} 22} \right\rbrack\mspace{599mu}} & \; \\{{Match} = \frac{S^{f}}{\left( {{T1^{f}} + {T2^{f}}} \right)/2}} & (22)\end{matrix}$

M_((x, y)) represents a mask pixel that defines which of the pixelsbelong to the background, and which of the pixels belong to theforeground. This mask can be realized by a simple 1-bit mask in which abackground is defined by 0, and a foreground is defined by 1.Alternatively, the mask may be a mask of one bit or more that supportsedges that are anti-aliased. In this mask, a value between 0 and 1 ishandled to indicate a combination of a partial background and a partialforeground. For example, a value of 0.25 (“01” in 2-bit notation)indicates a combination of 25% of foreground and 75% of background.

FIG. 17 shows a second example of the reference image, the display image(region of interest), and the mask image. A reference image ICC, adisplay image CIC, and a mask image MSC are the same as the referenceimage ICB, the display image CIB, and the mask image MSB in FIG. 15.FIG. 18 shows an example of edge values calculated from the referenceimage and the display image. EICC indicates an edge image of thereference image ICC, and ECIC indicates an edge image of the displayimage CIC. In the edge image ECIC of the display image, edge componentsthat are outside the icon (background) are masked by M_((x, y)). Asshown in FIG. 17, the shape index Match increases to 0.82 in the abovecomputation.

According to the embodiment described above, the index acquisitioncircuit 155 obtains an index that represents the degree of matchingbetween the foreground image, which is an image of a given region of thedisplay image, and the reference image, based on the pixel values of thedisplay image and the pixel values of the reference image, which is areference with respect to the foreground image, or based on the pixelvalues of an edge image of the display image and the pixel values of anedge image of the reference image. The pixel values of the edge imageeach represent an edge amount. The index that represents the degree ofmatching with the reference image is the shape index. The errordetection circuit 150 performs error detection on the display imagebased on the index.

In this way, error detection can be performed on a display image basedon the index that represents the degree of matching between a foregroundimage of the display image and a reference image, without performingbit-wise error detection such as CRC. If the degree of matching betweenthe foreground image and the reference image is high, it is highlylikely that the shape of the foreground image will be seen as the sameshape as the reference image. That is, according to the present method,it is possible that an error is determined when the shape of aforeground image is not properly displayed. For example, an icon and thelike for warning a user are displayed in an on-board meter panel or thelike, for example. According to the present embodiment, the display ofsuch an icon is not stopped due to a one-bit error or the like, andwarning to a user can be performed by displaying the icon as much aspossible, as long as the shape of the icon can be properly recognized.

Here, the first computation method shown by the above Equations (3) to(5) corresponds to a case where the index (S) is obtained based on thepixel values of a display image and the pixel values of a referenceimage, which is the reference with respect to the foreground image.Also, the second computation method shown by the above Equations (5) to(22) corresponds to a case where the index (Match) is obtained based onthe pixel values of an edge image of the display image and the pixelvalues of an edge image of the reference image. The pixel value of anedge image corresponds to an edge amount in the above Equations (7),(10), (17), and (18).

Also, the degree of matching refers to a matching degree of the shape ofan icon, a character, a figure, a mark, or the like (hereinafterreferred to as icon or the like), for example. More specifically, thedegree of matching refers to a matching degree with respect to theoutline and the orientation of an icon or the like. Also, furthermore,the degree of matching may include a matching degree of the state of theinside of the outline of an icon or the like, that is, the state as towhether or not the inside of an outline is filled or the like, forexample. For example, the index representing the degree of matching hasa larger value as the degree of matching between the foreground imageand the background image increases.

Also, in the present embodiment, the index acquisition circuit 155performs subsampling for decreasing the number of pixels or theresolution of a display image and a reference image (FIG. 11). The indexacquisition circuit 155 obtains distance information (Equation (2)) thatrepresents the distance in a color space between the pixel values of thedisplay image that has been subjected to subsampling and the pixelvalues of the reference image that has been subjected to subsampling,and the index (Equations (3) and (4)) is obtained from the distanceinformation.

As a result of performing subsampling, pixel values are averaged, andtherefore the influence of noise such as a one-bit error or the like canbe reduced when the index is obtained. That is, the influence of aminute error that does not affect the shape can be reduced. Also, thedistance between pixel values of the display image and pixel values ofthe reference image in the color space is to be small when the shapesmatch. Accordingly, as a result of using a distance in the color space,the matching degree of shapes can be appropriately evaluated.

Also, in the present embodiment, as shown in the above Equations (3) and(4), the index acquisition circuit 155 obtains the index (S) from avalue obtained by dividing a given threshold value (T) by the distanceinformation (D).

Since the higher the matching degree of the shapes is, the smaller thedistance (D) is, the index (S) whose value increases as the matchingdegree of the shapes increases can be obtained by dividing the giventhreshold value by the distance information.

Also, in the present embodiment, the index acquisition circuit 155performs a sum-of-product operation (Equation (13)) of the pixel valuesof an edge image of the display image and the pixel values of an edgeimage of the reference image, and obtains the index from the result ofthe sum-of-product operation (Equation (16)).

The edge image is an image in which the pixel value of each pixelrepresents an edge amount. In the case where the shapes match, if theedge image of the display image is compared with the edge image of thereference image with respect to the same pixel, the edge amounts must bethe same (approximately the same). Conversely, in the case where theshapes do not match, the positions of edges are different between thedisplay image and the reference image, therefore, even if there is alarge edge amount in the edge image of the display image, there arecases where the edge amount of the same pixel in the edge image of thereference image is zero, for example. Therefore, when a product of edgeamounts of the same pixel is obtained, and then the sum of products iscalculated, if the shapes match, the sum of products takes a largevalue, and if the shapes do not match, the sum of products takes a smallvalue. Accordingly, as a result of using a sum-of-products operation ofedge amounts, the matching degree of shapes can be appropriatelyevaluated.

Here, in the above Equation (13), the “product” of the sum of productsis an inner product of vectors, but the “product” is not limitedthereto. For example, when the edge amount is defined by a scalar, the“product” is a product of scalars.

Also, in the present embodiment, the index acquisition circuit 155 masksa region corresponding to the background image (Equation (18)), of theedge image of the display image, and performs a sum-of-product operationusing the edge image of the display image whose portion is masked(Equation (19)).

In this way, even in a case where an edge is included in the background,a sum-of-product operation of edge amounts can be performed while theedge is masked. That is, the degree of matching between the edges in thedisplay image and the edges in the reference image can be evaluatedwithout being affected by edges in the background, and therefore theaccuracy of the error detection can further be improved.

Also, the present embodiment can be implemented as a following errordetection method. That is, in this method, an index representing thedegree of matching between a foreground image, which is an image of agiven region of a display image, and a reference image is obtained basedon the pixel values of the display image and the pixel values of thereference image, which is a reference with respect to the foregroundimage, or based on the pixel values of an edge image of the displayimage and the pixel values of an edge image of the reference image, anderror detection is performed on the display image based on the index.

Also, the present embodiment can be implemented as a following errordetection method. That is, in this method, a region of interest of adisplay image is analyzed, and an index that represents the similarityto a reference image is computed. The index is computed using afollowing technique (a) or (b). (a) Three-dimensional distance errors ofpixels of a display image and a reference image (base signal) that havebeen subjected to subsampling are compared. (b) Three-dimensionaldistance errors of edges (first-derivative of an image) of the displayimage and the reference image are compared.

4. Modifications

In the above-descried embodiment, a case where the error detectionmethod of the invention has been applied to a display controller (TCON:Timing CONtroller) has been described as an example, but the applicationtarget of the invention is not limited thereto. That is, the inventioncan be applied in any stage of processing performed on a display imageor a transfer path of the display image.

For example, a display driver that drives a display panel may be thecircuit device to which the invention is applied. In this case, aninterface to which image data is input, in the display driver,corresponds to the image acquisition circuit, and the error detectioncircuit is provided between the interface and a drive circuit, forexample. The error detection circuit performs the error detection of theinvention on a given region (icon or the like) of an image received bythe interface without performing overlaying or the like, for example.

Also, in the above-described embodiment, a case has been described, asan example, in which the image processing circuit 135 overlays an iconon an image (hereinafter, referred to as an input image) that has beeninput to the display controller and subjected to pre-processing, so asto generate the display image, but the application target of theinvention is not limited thereto. That is, in the invention, any imagecan be acquired as the display image.

For example, the image itself that the image acquisition circuit hasacquired may be the display image. In this case, the interface 110corresponds to the image acquisition circuit. Alternatively, the inputimage itself that the pre-processing circuit 125 outputs may be thedisplay image. In these cases, an icon, for example, is already includedin the image acquired by the image acquisition circuit or in the inputimage, and a region including the icon or the like is set as the regionof interest.

Alternatively, the image processing circuit 135 may use an imageobtained by performing scaling processing on an input image as thedisplay image. In this case, an icon is included in the input image, forexample, the icon is scaled, and a region including the scaled icon isset as the region of interest.

Alternatively, the image processing circuit 135 may use an imageobtained by performing gamma conversion processing (tone conversionprocessing) on an input image as the display image. In this case, anicon is included in the input image, for example, the icon isgamma-converted, and a region including the gamma-converted icon is setas the region of interest.

Alternatively, the image processing circuit 135 may use an imageobtained by performing deformation processing on an input image as thedisplay image. In this case, an icon is included in the input image, forexample, the icon (or the entire input image) is deformed, and a regionincluding the deformed icon is set as the region of interest. Forexample, there are cases where an image is deformed so as to bedisplayed in a head mounted display or the like.

Alternatively, an image stored in a memory is read out, and the read-outimage may be set as the display image. In this case, a memory controllercorresponds to the image acquisition circuit. Alternatively, the imageacquisition circuit may use an image received by the interface as thedisplay image. In this case, the interface corresponds to the imageacquisition circuit.

5. Electronic Apparatus

FIG. 19 shows an exemplary configuration of an electronic apparatusincluding the circuit device of the present embodiment. The electronicapparatus 300 includes a processing device 310, a circuit device 320, adisplay driver 330, a display panel 340, a storage device 350, anoperation device 360, and a communication device 370. The processingdevice 310 is an MCU or the like, for example. The circuit device 320corresponds to the circuit device 100 in FIGS. 1 and 2, and is a TCON,for example.

The processing device 310 transfers image data stored in the storagedevice 350, or image data received by the communication device 370 tothe circuit device 320. The circuit device 320 performs image processingon image data, display timing control, error detection processing onimage data to be transferred to a display driver, and the like. In errordetection processing, the visibility index and the shape index arecalculated, and error detection based on these indices is performed. Thedisplay driver 330 drives the display panel 340 so as to display animage based on image data transferred from the circuit device 320 anddisplay timing control performed by the circuit device 320. The displaypanel 340 is a liquid-crystal display panel, an EL display panel, or thelike. The storage device 350 is a memory, a hard disk drive, an opticaldisk drive, or the like. The operation device 360 is a device forallowing a user to operate the electronic apparatus 300, and is abutton, a touch panel, a keyboard, or the like. The communication device370 is a device for performing wired communication, or a device forperforming wireless communication, for example. The wired communicationis a LAN, a USB, or the like, for example. The wireless communication isa wireless LAN, proximity wireless communication, or the like, forexample.

Various apparatuses such as an in-vehicle electronic apparatus, adisplay terminal of a plant facility, a display device mounted on anelectronic apparatus, an information processing device, and a mobileinformation processing terminal are envisioned as an electronicapparatus including the circuit device of the present embodiment. Thein-vehicle electronic apparatus is a meter panel or the like, forexample. The information processing device is a PC or the like, forexample. The mobile information processing terminal is a smartphone orthe like, for example. The configuration of the electronic apparatus isnot limited to that shown in FIG. 19, and various configurations can beadopted according to the application. For example, in the in-vehicleelectronic apparatus, the circuit device 320, the display driver 330,the display panel 340, and the operation device 360 are incorporatedinto the meter panel, and the processing device 310, the storage device350, and the communication device 370 are incorporated into the ECU(Electronic Control Unit). In this case, the meter panel corresponds tothe electronic apparatus including the circuit device of the presentembodiment.

Note that, although the present embodiment has been described in detailas described above, a person skilled in the art will appreciate thatnumerous modifications can be made without substantially departing fromthe novel matter and effects of the invention. Accordingly, all suchmodifications are intended to be embraced within the scope of theinvention. For example, terms that appear in the description or drawingsat least once together with other broader or synonymous terms can bereplaced by those other terms in any part of the description ordrawings. Also, all combinations of the present embodiment and themodifications are embraced within the scope of the invention. Also, theconfigurations and operations of the circuit device and the electronicapparatus are not limited to those described in the embodiment, andvarious modifications can be implemented.

What is claimed is:
 1. A circuit device comprising: an image acquisition circuit configured to acquire an input image data; an image processing circuit configured to perform image processing on the input image data so as to combine the input image data with a reference image stored in a memory to obtain a composite image, the composite image being a display image; and an index acquisition circuit configured to obtain an index for performing error detection on the display image, wherein: the index acquisition circuit is configured to obtain the index representing a degree of matching between a foreground image, which is an image of a given region of the composite image including a region where the reference image has been composited onto the input image data, and the reference image stored in the memory; the index is obtained based on pixel values of the composite image and pixel values of the reference image or based on pixel values of an edge image of the composite image and pixel values of an edge image of the reference image; display of the display image is performed when the degree of matching between the foreground image and the reference image is equal to or greater than a threshold; and an error is determined when the degree of matching between the foreground image and the reference image is below the threshold.
 2. The circuit device according to claim 1, wherein the index is a shape index that evaluates a similarity between a shape of the foreground image and the reference image.
 3. The circuit device according to claim 2, wherein the foreground image is an image of an icon in the display image, and the reference image is a mask image.
 4. The circuit device according to claim 1, further comprising an index register for storing the index.
 5. The circuit device according to claim 1, further comprising an error detection circuit configured to perform the error detection on the display image based on the index, wherein the error is determined by comparing the index to the threshold.
 6. The circuit device according to claim 1, wherein the index acquisition circuit is configured to obtain an additional index that is separate and distinct from the index and that represents a degree of visibility of the foreground image against a background image of the display image, and the error detection on the display image is performed using both the index and the additional index.
 7. An error detection method comprising: acquiring an input image data; generating a display image by performing image processing on the input image data so as to combine the input image data with a reference image stored in a memory to obtain a composite image, the composite image being the display image; and obtaining an index that represents a degree of matching between a foreground image, which is an image of a given region of the composite image including a region where the reference image has been composited onto the input image data, and the reference image stored in the memory, wherein: the index is obtained based on pixel values of the composite image and pixel values of the reference image, or based on pixel values of an edge image of the composite image and pixel values of an edge image of the reference image, the index is used for performing error detection on the display image; display of the display image is performed when the degree of matching between the foreground image and the reference image is equal to or greater than a threshold; and an error is determined when the degree of matching between the foreground image and the reference image is below the threshold.
 8. The error detection method of claim 7, wherein the index is a shape index that evaluates a similarity between a shape of the foreground image and the reference image.
 9. The error detection method of claim 8, wherein the foreground image is an image of an icon in the display image, and the reference image is a mask image.
 10. The error detection method of claim 7, wherein the index is stored in an index register.
 11. The error detection method of claim 7, further comprising performing the error detection on the display image, by an error detection circuit, by comparing the index to the threshold.
 12. The error detection method of claim 7, wherein an additional index is obtained, which is separate and distinct from the index and which represents a degree of visibility of the foreground image against a background image of the display image, and the error detection on the display image is performed using both the index and the additional index. 